<?php
/**
 * Created by PhpStorm.
 * User: alice
 * Date: 2015/12/26
 * Time: 14:14
 */

/**
 * Class Involved_BankManageModel
 */

class Involved_DealDepositModel extends BaseModel
{

    protected $table = 'deal_deposit';

    /**
     * 获取单个用户充值记录
     */
    public function GetUserDeposit($user_id){
        return  DB::table($this->table)
            ->where('user_id',$user_id)
            ->orderBy('add_time','desc')
            ->get();
    }

    /**
     * 获取单个用户充值记录
     */
    public function GetUserDepositSum($user_id){
        return  DB::table($this->table)
            ->where('user_id',$user_id)
            ->sum('amount');
    }
}